package decorationPrice.strategy;

import decorationPrice.abs.Fruit;

import java.util.List;

public class TotalDiscountStrategy implements PromotionStrategy {
    private double discountRate;

    public TotalDiscountStrategy(double discountRate) {
        this.discountRate = discountRate;
    }

    @Override
    public double apply(double originalPrice, List<Fruit> fruits) {
        return originalPrice * discountRate;
    }
}